package com.ek.common;

import java.io.Serializable;
import java.util.Hashtable;
import java.util.Map;

import com.ek.service.MulticastReceiver;
import com.ek.service.TaskManager;
import com.ek.service.mina.ComunicationService;
import com.ek.service.mina.handler.DispatcherHandler;

public class Context {

    private byte[] nodeID;
    private RoutingTable routingTable;
    private TaskManager taskManager;
    private ComunicationService comunicationService;
    private DispatcherHandler receivedPacketHandler;
    private Map<String, Serializable> data;
    private Hashtable<String, MessageHandler> handlers;
    private MulticastReceiver multicastReceiver;

    public RoutingTable getRoutingTable() {
        return routingTable;
    }

    public void setRoutingTable(RoutingTable routingTable) {
        this.routingTable = routingTable;
    }

    public TaskManager getTaskManager() {
        return taskManager;
    }

    public void setTaskManager(TaskManager taskManager) {
        this.taskManager = taskManager;
    }

    public ComunicationService getComunicationService() {
        return comunicationService;
    }

    public void setComunicationService(ComunicationService comunicationService) {
        this.comunicationService = comunicationService;
    }

    public void setReceivedPacketHandler(DispatcherHandler receivedPacketHandler) {
        this.receivedPacketHandler = receivedPacketHandler;
    }

    public DispatcherHandler getReceivedPacketHandler() {
        return receivedPacketHandler;
    }

    public void setNodeID(byte[] nodeID) {
        this.nodeID = nodeID;
    }

    public byte[] getNodeID() {
        return nodeID;
    }

    public void setData(Map<String, Serializable> data) {
        this.data = data;
    }

    public Map<String, Serializable> getData() {
        return data;
    }

    public void setHandlers(Hashtable<String, MessageHandler> handlers) {
        this.handlers = handlers;
    }

    public Hashtable<String, MessageHandler> getHandlers() {
        return handlers;
    }

    public void setMulticastReceiver(MulticastReceiver multicastReceiver) {
        this.multicastReceiver = multicastReceiver;
    }

    public MulticastReceiver getMulticastReceiver() {
        return multicastReceiver;
    }
}
